-
Notifications
You must be signed in to change notification settings - Fork 6
feat: data provider for wrapped tokens #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
| struct TokenDetails { | ||
| address token; | ||
| uint256 balance; | ||
| int256 latestAnswer; | ||
| uint8 decimals; | ||
| string name; | ||
| string symbol; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| struct TokenDetails { | |
| address token; | |
| uint256 balance; | |
| int256 latestAnswer; | |
| uint8 decimals; | |
| string name; | |
| string symbol; | |
| } | |
| struct UserPosition { | |
| address token; | |
| uint256 balance; | |
| int256 tokenPrice; | |
| uint8 tokenDecimals; | |
| string tokenName; | |
| string tokenSymbol; | |
| } |
we can cast the int256 into uint256 as well.
| WrappedToken[] memory wrappedTokens = new WrappedToken[](wrappedTokenConfigs.length); | ||
|
|
||
| for (uint256 i = 0; i < wrappedTokenConfigs.length; i++) { | ||
| WrappedToken memory wrappedToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move out of the loop
| address tokenWrapperContract; | ||
| } | ||
|
|
||
| struct WrappedTokenConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| struct WrappedTokenConfig { | |
| struct TokenWrapperData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing docs in general
Uh oh!
There was an error while loading. Please reload this page.